﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Media;
using System.Speech.Synthesis;

namespace Hugo
{
    class Sounds
    {
        public enum Sound { Notification, Navigate, Accept, Reject }

        public static void playSound(Sound s) {

            if (GlobalSettings.soundMuted) { return; }

            SoundPlayer sound = null;

            switch (s)
            {
                case Sound.Accept:
                    sound = new SoundPlayer(Properties.Resources.Xbox360_power_on);
                    break;
                case Sound.Reject:
                    sound = new SoundPlayer(Properties.Resources.apple_smsreceived);
                    break;
                case Sound.Notification:
                    sound = new SoundPlayer(Properties.Resources.apple_smsreceived);
                    break;
                case Sound.Navigate:
                    sound = new SoundPlayer(Properties.Resources._779__vitriolix__chick_corkscrew);
                    break;
                    
            }

            if (sound != null)
            {
                sound.Play();
            }

        }

        internal static void speakMessageAsync(string p)
        {
            if (GlobalSettings.soundMuted) return;

            SpeechSynthesizer reader = new SpeechSynthesizer();
            reader.SpeakAsync(p);
        }

        internal static void speakMessage(string p)
        {
            if (GlobalSettings.soundMuted) return;

            SpeechSynthesizer reader = new SpeechSynthesizer();
            reader.Speak(p);
        }
    }
}
